import * as mongoose from 'mongoose';

const AccountSchema = new mongoose.Schema({
  id: Number,
  account_name: String,
  password: String,
  admin: { type: Boolean, default: false },
  avatar: { type: String, default: 'default.jpg' },
  create_city: String,
  create_time: { type: Date, default: new Date() }
});

AccountSchema.index({id: 1});

export default AccountSchema;